import type { RouteRecordRaw } from "vue-router";
/**
 * 路由meta对象参数说明
 * meta: {
 *      title:          菜单栏及 tagsView 栏、菜单搜索名称（国际化）
 *      hidden：        是否隐藏此路由
 *      icon：          菜单、tagsView 图标，阿里：加 `iconfont xxx`，fontawesome：加 `fa xxx`
 * }
 */

/**
 * 静态路由（默认路由）
 */
export const staticRoutes: Array<RouteRecordRaw> = [
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/error/404.vue"),
    meta: {
      hidden: true,
    },
  },
  {
    path: "/",
    component: () => import("@/views/discoverMusic/index.vue"),
    redirect: "/discovermusic/recommend",
  },
  {
    path: "/discovermusic",
    name: "DiscoverMusic",
    component: () => import("@/views/discoverMusic/index.vue"),
    redirect: "/discovermusic/recommend",
    meta: {
      title: "发现音乐",
    },
    children: [
      {
        path: "recommend",
        name: "Recommend",
        component: () => import("@/views/discoverMusic/recommend/index.vue"),
        meta: {
          title: "推荐",
        },
      },
      {
        path: "ranking",
        name: "Ranking",
        component: () => import("@/views/discoverMusic/ranking/index.vue"),
        meta: {
          title: "排行榜",
        },
      },
      {
        path: "songList",
        name: "SongList",
        component: () => import("@/views/discoverMusic/songList/index.vue"),
        meta: {
          title: "歌单",
        },
      },
      {
        path: "/songList",
        name: "DetailsSong",
        component: () =>
          import("@/views/discoverMusic/songList/components/detailsSong.vue"),
        meta: {
          title: "歌单详情",
          hidden: true,
        },
      },
      {
        path: "/discovermusic/radio",
        name: "Radio",
        component: () => import("@/views/discoverMusic/radio/index.vue"),
        meta: {
          title: "主播电台",
        },
      },
      {
        path: "singer",
        name: "Singer",
        component: () => import("@/views/discoverMusic/singer/index.vue"),
        // redirect: "/discovermusic/singer",
        meta: {
          title: "推荐歌手-歌手",
        },
        children: [],
      },
      {
        path: "singer/ruzhu",
        name: "RuZhu",
        component: () =>
          import("@/views/discoverMusic/singer/components/RuZhu/index.vue"),
        meta: {
          title: "入驻歌手-歌手",
        },
      },
      {
        path: "singer/hyn",
        name: "HYN",
        component: () =>
          import("@/views/discoverMusic/singer/components/Hyn/index.vue"),
      },
      {
        path: "newalbum",
        name: "NewAlbum",
        component: () => import("@/views/discoverMusic/newAlbum/index.vue"),
        meta: {
          title: "新碟上架",
        },
      },
    ],
  },
  {
    path: "/mymusic",
    name: "MyMusic",
    component: () => import("@/views/myMusic/index.vue"),
    redirect: "/mymusic/createdsonglist",
    meta: {
      title: "我的音乐",
    },
    children: [
      {
        path: "mysinger",
        name: "MySinger",
        component: () => import("@/views/myMusic/mySinger/index.vue"),
        meta: {
          title: "我的歌手",
        },
      },
      {
        path: "myvideo",
        name: "MyVideo",
        component: () => import("@/views/myMusic/myVideo/index.vue"),
        meta: {
          title: "我的视频",
        },
      },
      {
        path: "myradio",
        name: "MyRadio",
        component: () => import("@/views/myMusic/myRadio/index.vue"),
        meta: {
          title: "我的电台",
        },
      },
      {
        path: "createdsonglist",
        name: "CreatedSongList",
        component: () => import("@/views/myMusic/createdSongList/index.vue"),
        meta: {
          title: "创建的歌单",
        },
      },
      {
        path: "collectedsonglist",
        name: "CollectedSongList",
        component: () => import("@/views/myMusic/collectedSongList/index.vue"),
        meta: {
          title: "收藏的歌单",
        },
      },
    ],
  },
  {
    path: "/myattention",
    name: "MyAttention",
    component: () => import("@/views/myAttention/index.vue"),
    meta: {
      title: "关注",
    },
  },
  {
    path: "/artist",
    name: "Artist",
    component: () => import("@/views/artist/index.vue"),
    meta: {
      title: "歌手主页",
    },
    children: [
      {
        path: "/artist",
        name: "HotWork",
        component: () => import("@/views/artist/components/hotWork/index.vue"),
      },
      {
        path: "album",
        name: "Album",
        component: () => import("@/views/artist/components/allAlbum/index.vue"),
      },
      {
        path: "allmv",
        name: "AllMV",
        component: () => import("@/views/artist/components/allMV/index.vue"),
      },
      {
        path: "info",
        name: "Info",
        component: () => import("@/views/artist/components/info/index.vue"),
      },
    ],
  },
  {
    path: "/mv",
    name: "MV",
    component: () => import("@/views/mv/index.vue"),
    meta: {
      title: "MV",
    },
  },
  {
    path: "/downloadclient",
    name: "DownloadClient",
    component: () => import("@/views/downloadClient/index.vue"),
    meta: {
      title: "下载客户端",
    },
  },

  /* 匹配任意的路由 必须最后注册 */
  {
    path: "/:pathMatch(.*)",
    name: "Any",
    redirect: "/404",
    meta: {
      hidden: true,
    },
  },
];

/**
 * 定义动态路由
 */
export const allAsyncRoutes: Array<RouteRecordRaw> = [];
